package com.chagee.store.operation.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @ClassName appealStatusEnum  //类名称
 * @Description: //类描述
 * @Author: Jacky-zhan	//作者
 * @CreateDate: 2024/7/1 17:39	//创建时间
 * @UpdateUser: Jacky-zhan  //变更者
 * @UpdateDate: 2024/7/1 17:39	//更新时间
 * @UpdateRemark: //更新的信息
 * @Version: 1.0    //版本号
 */
@Getter
@AllArgsConstructor
public enum AppealStatusEnum {

	PENDING_PROCESSING(0, "待处理"),
	PASSED(1, "已通过"),
	REJECTED(2, "已驳回"),
	;

	private final Integer type;
	private final String desc;

	public static AppealStatusEnum getByType(Integer type) {
		for (AppealStatusEnum value : values()) {
			if (Objects.equals(value.getType(), type)) {
				return value;
			}
		}
		return null;
	}

}
